<!--conf
<sample>
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Grid linked to grid</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		dhtmlx.skin = "dhx_skyblue";
	</script>
</head>

<body>
	<h1>Grid linked to grid</h1>
	<p>You can use one grid as editor for another grid. Just try to edit column with authors.</p>
	
	<div id="gridbox" style="width:600px; height:270px; background-color:white;"></div>
	<div id="gridbox_sub" style="width:300px; height:150px; background-color:white;"></div>
	
<script>
	subgrid = new dhtmlXGridObject('gridbox_sub');
	subgrid.setImagePath("../../../codebase/imgs/");
	subgrid.setHeader("Name,UID,Total count");
	subgrid.setInitWidths("100,100,100")
	subgrid.enableAutoHeight(true);
	subgrid.setColTypes("ro,ro,ro");
	subgrid.init();
	subgrid.loadXML("../common/authors.xml",function(){
		mygrid = new dhtmlXGridObject('gridbox');
		mygrid.setImagePath("../../../codebase/imgs/");
		mygrid.setHeader("Sales, Book Title, Author,Price,In Store,Shipping,Bestseller,Date of Publication");
		mygrid.setInitWidths("50,150,100,80,80,80,80,200")
		mygrid.setColAlign("right,left,left,right,center,left,center,center")
		mygrid.setColTypes("dyn,ed,grid,price,ch,co,ra,ro");
		mygrid.setSubGrid(subgrid,2,0);
		mygrid.init();
		mygrid.loadXML("../common/grid_authors.xml");
		});
	
</script>

</body>
</html>
